package com.car.service;

import com.car.dao.PurchaseRecordDao;
import com.car.dao.impl.PurchaseRecordDaoImpl;
import com.car.domain.PurchaseRecord;

import java.util.List;

public class PurchaseRecordService {
    private static final PurchaseRecordDao purchaseRecordDao = new PurchaseRecordDaoImpl();

    public List<PurchaseRecord> findByUserId(Integer userId) throws Exception {
        return purchaseRecordDao.findByUserId(userId);
    }

    public List<PurchaseRecord> list() throws Exception {
        return purchaseRecordDao.queryAll();
    }
}
